# -*- coding: utf-8 -*-

from setuptools import setup, find_packages
import os
import sys
import codecs


PACKAGE = "kfkmessage"
NAME = "kafka-message"
DESCRIPTION = ""
AUTHOR = "cary"
AUTHOR_EMAIL = "caolei@yunzujia.com"
URL = "https://code.clouderwork.com/clouderwork/kafka-framework"

TOPDIR = os.path.dirname(__file__) or "."
VERSION = __import__(PACKAGE).__version__

desc_file = codecs.open("README.rst", 'r', 'utf-8')
try:
    LONG_DESCRIPTION = desc_file.read()
finally:
    desc_file.close()

env_version = sys.version_info

if env_version > (3, 5):
    requires = [
        "aiokafka==0.5.1"
    ]
if env_version > (2, 6) and env_version < (3, 0):
    requires = [
        "kafka-python==1.4.6"
    ]


setup(
    name=NAME,
    version=VERSION,
    description=DESCRIPTION,
    long_description=LONG_DESCRIPTION,
    author=AUTHOR,
    author_email=AUTHOR_EMAIL,
    license="Apache",
    url=URL,
    keywords=['cloudwork', 'clouderwork', 'yunzujia', 'yunwoke'],
    packages=find_packages(exclude=["tests*"]),
    include_package_data=True,
    platforms='any',
    install_requires=requires,
    classifiers=(
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7'
        'Programming Language :: Python :: 3.5'
        'Topic :: Software Development',
    )
)
